<template>
	<view class="detail">
		<ring-chart :count="detail.accuracy" flag="2" />
		<uni-card>
			<view>所属分类:{{detail.allClassifyName}}</view>
			<view>题数:{{detail.total}}</view>
			<view>花费时间:{{detail.spentTime}}s</view>
			<view>正确题数:{{detail.correctNum}}</view>
			<view>错误题数:{{detail.errorNum}}</view>
			<view>创建时间:{{detail.createTime}}</view>
		</uni-card>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	import {
		onLoad,
	} from '@dcloudio/uni-app'
	import {
		getExamDetailById
	} from '@/service/modules/personal';

	const detail = ref({})

	onLoad(async (options) => {
		const res = await getExamDetailById(options.id)
		detail.value = res.data
		console.log(res);
	})
</script>

<style lang="scss">

</style>